package com.flin.icesilkworm.examination.bas.service.impl;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.flin.icesilkworm.examination.bas.constant.ITheExaminationPaperConstant;
import com.flin.icesilkworm.examination.bas.model.TheExaminationPaper;
import com.flin.icesilkworm.examination.bas.po.TheExaminationPaperRelDo;
import com.flin.icesilkworm.examination.bas.service.ITheExaminationPaperService;
import com.flin.icesilkworm.examination.gen.bas.service.GeneratedTheExaminationPaperService;
@Service("theExaminationPaperService")
@Transactional
public class TheExaminationPaperServiceImpl extends GeneratedTheExaminationPaperService implements ITheExaminationPaperService,ITheExaminationPaperConstant{


	@Transactional
	public Long saveTheExaminationPaper(TheExaminationPaper t) {
		
		 Long sourceId =  t.getPagerId();
		 try{
			 return super.saveTheExaminationPaper(t);
		 }finally{
			 TheExaminationPaperRelDo.set().openRecord()
			 	.pagerId(t.getPagerId())
			 	.re()
			 	.where(a->a.andPagerIdEqualTo(sourceId))
			 	.updateForWhere();
		 }
		 
	}
	
}